
CREATE TABLE DataOperationFailure
(
    ID INT IDENTITY(1, 1) NOT NULL PRIMARY KEY,
    DataOperationID INT NOT NULL REFERENCES DataOperation(ID),
    FileGroupID INT NOT NULL REFERENCES FileGroup(ID),
    [Log] VARCHAR(1000) NOT NULL,
    StackTrace VARCHAR(MAX) NOT NULL,
    TimeOfFailure DATETIME NOT NULL
)
GO

CREATE NONCLUSTERED INDEX IX_SentEmail_EmailTypeID
ON SentEmail(EmailTypeID ASC)
GO

CREATE NONCLUSTERED INDEX IX_SentEmail_TimeSent
ON SentEmail(TimeSent ASC)
GO

UPDATE Setting SET Name = 'EventEmail.EmailDuplicateThresholdMinutes' WHERE Name = 'EventEmail.EmailDuplicateThesholdMinutes'